package com.oig.sys.workflow.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 * 数据实体
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_data_module")
@EntityListeners({AuditingEntityListener.class})
public class TbDataModule implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 * 实体对象名称
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 表名
	 */
	@Column(name = "table_name")
	private String tableName;

	/**
	 * 状态 通用状态码
	 */
	@Column(name = "status")
	private String status;

	/**
	 */
	@Column(name = "remark")
	private String remark;

	/**
	 */
	@LastModifiedBy
	@Column(name = "last_update_id")
	private Integer lastUpdateId;

	/**
	 */
	@Column(name = "last_update_name")
	private String lastUpdateName;

	/**
	 */
	@LastModifiedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update_time")
	private java.util.Date lastUpdateTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;

	/**
	 */
	@Column(name = "data_json")
	private String dataJson;
}
